package net.qiqbframework.common.lock;

public class NoTopicLock implements TopicLock {

    public static final TopicLock INSTANCE = new NoTopicLock();

    private NoTopicLock() {
        // Retrieve version through static INSTANCE.
    }

    @Override
    public boolean tryLock() {
        return true;
    }

    @Override
    public boolean lock() {
        return true;
    }

    @Override
    public void release() {
        // Not implemented for this no-op version.
    }

    @Override
    public boolean isHeld() {
        return true;
    }

    @Override
    public String getTopicName() {
        return "";
    }
}
